/*
 * @lc app=leetcode.cn id=389 lang=cpp
 *
 * [389] 找不同
 */

// @lc code=start
class Solution
{
public:
  char findTheDifference(string s, string t)
  {
    int s_xor_t = 0;
    for (char& c : s)
      s_xor_t ^= c;
    for (char& c : t)
      s_xor_t ^= c;
    return s_xor_t;
  }
};
// @lc code=end
